package com.excellent.service;

import com.excellent.entity.User;
import com.excellent.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserService {
    @Autowired
    UserMapper userMapper;

    public List<User> findAll() {
        return userMapper.findAll();
    }

    public void insert(User entity) {
        userMapper.insert(entity);
    }

    public void update(User entity) {
        userMapper.update(entity);
    }

    public void delete(Long id) {
        userMapper.delete(id);
    }

}